/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package csse3004.GD.PC;

import csse3004.GD.MCAnswer;
import csse3004.GD.Poll;
import csse3004.GD.Question;
import csse3004.GD.SRAnswer;
import java.util.ArrayList;

/**
 *
 * @author Tom McNair - S41758984
 */
public interface PollCreatorService {

    public ArrayList<Poll> getPolls(int creatorID);

    public boolean assignPM(int pollID, int masterID);

    /**
     * Function that adds a new Multiple Choice Question to the database
     * 
     * @param questionText text of the question to be asked
     * @param style Vertical/Horizontal/Pie
     * @param template Is it a template question Yes/No
     * @param ranking is it a ranking question Yes/No
     * @param demographic is it a demographic question Yes/No
     * @param comparison is it a comparison question Yes/No
     * @param pollID id of the parent poll
     * @return 
     */
    public boolean addMCQuestion(String questionText, String style, String template, String ranking, String demographic, String comparison, int pollID);

    /**
     * Function that adds a new Short Response Question
     * 
     * @param questionText the text of the question that you are asking
     * @param questionType Numeric or Alphanumeric
     * @param pollID the ID of the parent poll
     * @return 
     */
    public boolean addSRQuestion(String questionText, String questiontype, int pollID);

    /**
     * A function that adds a location to a poll
     * 
     * @param pollID ID of the poll
     * @param latitude Latitude of the Location
     * @param longitude Longitude of the Location
     * @param name Name of the Location
     * @return 
     */
    public boolean addLocationToPoll(int pollID, double latitude, double longitude);

    public ArrayList<MCAnswer> getMCAnswers(int questionID);

    public ArrayList<SRAnswer> getSRKeywords(int questionID);

    public ArrayList<Question> getQuestions(int pollID);

    public Question getQuestion(int questionID);

    /**
     * Sets the users password, no validation beyond that the user exists is 
     * required
     * @param userID
     * @param password The password to be set
     * @return false only if the user doesn't exist
     */
    public boolean setPassword(int userID, String password);

    public boolean deleteMCAnswer(int answerID);

    public boolean deleteQuestion(int questionID);

    public boolean deleteSRKeyword(int keywordID);

    public boolean editMCQuestion(int questionID, String questionText, String style, String template, String ranking, String demographic, String comparison, int pollID);

    public boolean editSRQuestion(int questionID, int SRQuestionID, String questionText, String questiontype, int pollID);

    public boolean addMCAnswer(String text, boolean correct, int weighting, int questionID);

    public boolean addSRKeyword(String text, int questionID);
}
